package com.linked.gateway.controller;

import com.linked.universal.common.Result;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :dbq
 * @date : 2022/9/23 15:21
 */
@RestController
public class DefaultController {


    @GetMapping("/")
    public Result get() {
        return Result.success("欢迎访问Linked网关!");
    }

    /**
     * 熔断降级接口
     */
    @RequestMapping(value = "/fallback")
    public Result fallback() {
        return Result.ok("503",false,"Hystrix fallback!",null);
    }
}
